package com.sms.service.impl;

import com.sms.dao.StudentInfoMapper;
import com.sms.pojo.StudentInfo;
import com.sms.service.StudentInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentInfoServiceImpl implements StudentInfoService {

    @Autowired
    private StudentInfoMapper studentInfoMapper;

    @Override
    public int insertStudent(StudentInfo studentInfo) {
        return studentInfoMapper.insertStudent(studentInfo);
    }

    @Override
    public int updateStudent(StudentInfo studentInfo) {
        return studentInfoMapper.updateStudent(studentInfo);
    }

    @Override
    public int deleteStudent(Integer sid) {
        return studentInfoMapper.deleteStudent(sid);
    }

    @Override
    public StudentInfo LoginStudent(Integer sid, String psw) {
        return studentInfoMapper.LoginStudent(sid,psw);
    }

    @Override
    public StudentInfo selectStudentById(Integer sid) {
        return studentInfoMapper.selectStudentById(sid);
    }

    @Override
    public List<StudentInfo> selectStudentAll() {
        return studentInfoMapper.selectStudentAll();
    }
}
